import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:niuniu/common/constant/AppColor.dart';

import 'ColorSchemes.dart';

/// 主题
class AppTheme {
  /// 亮色
  static ThemeData light = ThemeData(
    colorScheme: const ColorScheme.light(),
    brightness: Brightness.light,
    fontFamily: "Montserrat",
    // 全局去除水波纹
    splashColor: Colors.transparent,
    highlightColor: Colors.transparent,
    splashFactory: NoSplash.splashFactory,
    // app 背景
    scaffoldBackgroundColor: AppColor.appBgColor,
    appBarTheme:  AppBarTheme(
      // appBar 暗色 , 和主题色相反
      systemOverlayStyle: SystemUiOverlayStyle.dark,
      // 背景透明
      backgroundColor: AppColor.topNavBgColor,
      // 取消阴影
      elevation: 0,
      // 图标样式
      iconTheme: IconThemeData(
        color: AppColor.iconColor,
        weight: 200,
      ),
      // 标题
      titleTextStyle: TextStyle(
        color: AppColor.firstFontColor,
        fontSize: 20,
        fontWeight: FontWeight.w200,
      ),
    ),
    bottomAppBarTheme:  BottomAppBarTheme(
      // shadowColor:Colors.transparent,
      // 背景
      color: AppColor.bottomNavBgColor,
      // 取消阴影
      elevation: 0,
    ),

  );

  /// 暗色
  static ThemeData dark = ThemeData(
    colorScheme: ColorScheme.light().copyWith(
    secondary: const Color(0XFF111111), // 想要的自定义颜色
  ),
    brightness: Brightness.dark,
    fontFamily: "Montserrat",
    // 全局去除水波纹
    splashColor: Colors.transparent,
    highlightColor: Colors.transparent,
    splashFactory: NoSplash.splashFactory,
    // app 背景
    scaffoldBackgroundColor: AppColor.appBgColor,
    appBarTheme:  AppBarTheme(
      systemOverlayStyle: SystemUiOverlayStyle.light, // appBar 亮色 , 和主题色相反
      // 背景透明
      backgroundColor: AppColor.topNavBgColor,
      // 取消阴影
      elevation: 0,
      // 图标样式
      iconTheme: IconThemeData(
        color: AppColor.iconColor,
        weight: 200,
      ),
      // 标题
      titleTextStyle: TextStyle(
        color: AppColor.firstFontColor,
        fontSize: 20,
        fontWeight: FontWeight.w200,
      ),
    ),
    bottomAppBarTheme:  BottomAppBarTheme(
      // shadowColor:Colors.transparent,
      // 背景
      color: AppColor.bottomNavBgColor,
      // 取消阴影
      elevation: 0,
    ),
  );
}
